/**
 * 打开登录窗口
 */
function regist() {
	$("#regist").dialog("setTitle", '用户注册').dialog('open').dialog('refresh', 'registForward.do');
}
/**
 * 登录
 */
function login() {
	$('#loginForm').form('submit', {
		url:'login.do',
		onSubmit:function() {
			return true;
		},
		success:function(data) {
			if(data == 'success') {
				window.location.href="forward.do";	
			} else if(data == 'loginError') {
				$.messager.alert('登陆错误','用户名或密码不正确!','warning');
			} else if(data == 'codeError') {
				$.messager.alert('验证码错误','验证码不正确!','warning');
			}
		}
	});
}
/**
 * 获得验证码
 */
function modifyCode() {
	var timestamp = (new Date()).valueOf();
	$("#imageCode").attr("src", "createCode.do?timestamp=" + timestamp);
}